package com.hundsun.yr.universal.p2p.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.hundsun.mobile.zwgt.R;
import com.hundsun.yr.universal.library.eventbus.EventCenter;
import com.hundsun.yr.universal.library.netstatus.NetUtils;
import com.hundsun.yr.universal.library.widget.HSButton;
import com.hundsun.yr.universal.p2p.ui.activity.base.BaseActivity;

/**
 * Created by apple on 2017/11/28.
 */

public class InvestSuccessAcitivity extends BaseActivity implements View.OnClickListener{
    private HSButton btn_invest_detail = null;
    private HSButton btn_invest = null;
    private String INVESTAMOUNT;
    private TextView tv_invest_money;
    private TextView tv_invest_money2;

    @Override
    protected boolean isApplyKitKatTranslucency() {
        return false;
    }

    @Override
    protected int getContentViewLayoutID() {
        return R.layout.act_invest_success;
    }

    @Override
    protected void initViewsAndEvents() {
        btn_invest_detail = findView(R.id.btn_invest_detail);
        btn_invest = findView(R.id.btn_invest);
        tv_invest_money = findView(R.id.tv_invest_money);
        tv_invest_money2 = findView(R.id.tv_invest_money2);

        if (INVESTAMOUNT != null){
            tv_invest_money.setText(getString(R.string.you_success_invest,INVESTAMOUNT));
            tv_invest_money2.setText(getString(R.string.success_invest_,INVESTAMOUNT));
        }

        btn_invest_detail.setOnClickListener(this);
        btn_invest.setOnClickListener(this);

        setToolbarTitle(getString(R.string.mine_pay_success));
    }

    @Override
    protected void getBundleExtras(Bundle extras) {
        INVESTAMOUNT = extras.getString("INVESTAMOUNT");
    }

    @Override
    protected void onEveComming(EventCenter eventCenter) {

    }

    @Override
    protected boolean isBindEventBusHere() {
        return false;
    }

    @Override
    protected View getLoadingTargetView() {
        return null;
    }

    @Override
    protected void onNetworkConnected(NetUtils.NetType type) {

    }

    @Override
    protected void onNetworkDisConnected() {

    }

    @Override
    protected boolean isApplyStatusBarTranslucency() {
        return false;
    }

    @Override
    protected boolean toggleOverridePendingTransition() {
        return false;
    }

    @Override
    protected TransitionMode getOverridePendingTransitionMode() {
        return null;
    }

    protected void initImmersionBar() {
        super.initImmersionBar();
        mImmersionBar.titleBar(R.id.common_toolbar).init();
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_invest_detail:
                readyGoThenKill(MineInvestActivity.class);
                break;
            case R.id.btn_invest:
                finish();
                break;
        }
    }
}
